package com.liruo.demojsrjpa.model.entity;

import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.GenericGenerator;

@AllArgsConstructor
@NoArgsConstructor
@Data
@Entity
public class DmlEntity {
  @GenericGenerator(name = "DMLEntity", strategy = "uuid2")
  @GeneratedValue(generator = "DMLEntity")
  @Id
  private String id;
  private String name;
  @CreationTimestamp
  private Date createdAt;
}
